package com.liukai.todo_android.entity.vo;

import java.util.HashMap;
import java.util.Map;

public class QueryPage {
    private Integer currPage = 1;
    private Integer pageSize = 10;

    public Integer getCurrPage() {
        return currPage;
    }

    public QueryPage setCurrPage(Integer currPage) {
        this.currPage = currPage;
        return this;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public QueryPage setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
        return this;
    }

    @Override
    public String toString() {
        return "QueryPage{" +
                "currPage=" + currPage +
                ", pageSize=" + pageSize +
                '}';
    }

    public Map<String, Object> buildMap() {
        Map<String, Object> map = new HashMap<>(2);
        if (this.getCurrPage() != null) {
            map.put("currPage", this.getCurrPage());
        }
        if (this.getPageSize() != null) {
            map.put("pageSize", this.getPageSize());
        }
        return map;
    }
}

